package exce1.exce05;

import java.util.Random;

public class Exer05 {
    public static void main(String[] args) {
        String code = "";
        Random r = new Random();
        char[] ch = new char[62];
        int index = 0;
        for (int i = 65, j = 97; i < 65 + 26; i++, j++) {
            ch[index++] = (char) i;
            ch[index++] = (char) j;
        }
        for (int k = 49; k < 58; k++) {
            ch[index++] = (char) k;
        }
        for (int i = 0; i < ch.length; i++) {
            System.out.print(ch[i]);
        }
        System.out.println();
        for (int i = 0; i < 4; i++) {
            int m = r.nextInt(62);
            code += ch[m];
        }
        System.out.println(code);
    }
}
